<?php
//include("../include/function.php");
dbconnect();
session_start();
?>
<?php
if($_SESSION["loggedin"]==true && $_SESSION["role"]==admin)
{
if(isset($_SESSION[msg]))
{
echo $_SESSION[msg];
unset($_SESSION[msg]);
}
?>
<form action="index.php?management=client&&task=add" method="post">
<input type="text" value="<?php echo $_POST['clientname']; ?>" name="clientname"/> 
<input type="submit" value="save" name="clientmanage"/>
</form>
<?php 
if(isset($_POST['clientmanage']))
{
$clientname = $_POST['clientname'];

$insertvalue = array();

$insertvalue[clientname]=$clientname;
$insertq = insertquery("client",$insertvalue);

/* $clientinsert = "INSERT into client (clientname) values('$clientname')";
$client = mysql_query($clientinsert); */
header("Location: index.php?management=client");

}
?>
<?php 

?>
<?php
}
else
{
header("Location: login.php");
}
?>